package com.yue.rpc.registry;

import com.yue.rpc.extension.SPI;
import com.yue.rpc.remoting.dto.RpcRequest;

import java.net.InetSocketAddress;

/**
 * @Author zhangqiyue
 * @Description
 * @Date 2023/3/2 15:24
 */
@SPI
public interface ServiceDiscovery {
    /**
     * lookup service by rpcServiceName
     *
     * @param rpcRequest rpc service pojo
     * @return service address
     */
    InetSocketAddress lookupService(RpcRequest rpcRequest);
}
